<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>Document</title>
</head>
<body>
	<table border=1>
		<tr>
			<td>名字</td>
			<td>性别</td>
			<td>年龄</td>
			<td>操作</td>
		</tr>
	<?php foreach ($p as $key => $value) { ?>
		<tr <?php if ($key%2==1) { echo 'bgcolor="red"';} ?>>
			<td><?php echo $value["name"] ?></td>
			<td><?php echo $value["sex"] ?></td>
			<td><?php echo $value["age"] ?></td>
			<td><a href="./shuju.php?id=<?php echo $key ?>">详情</a></td>
		</tr>
	<?php } ?>
	</table>
</body>
</html>